import { ElMessageBox } from "element-plus";
import SvgIcon from "@/components/SvgIcon/index.vue";
const noop = () => {};
const confirm = (options) => {
  const {
    beforeClose = noop,
    callback = noop,
    content,
    title,
    tips,
    showCancelButton = true,
  } = options || {};
  ElMessageBox({
    showClose: true,
    draggable: true,
    showCancelButton,
    confirmButtonText: "确定",
    customClass:"public-confirm-box",
    confirmButtonClass:"public-confirm-btn",
    title,
    message: (
      <div>
        <div class="flex items-center">
          <SvgIcon icon-class="HintFilled" class="flex-shrink-0 w-[14px] h-[14px] mr-[2px]"/>
          {/* <span class="flex-shrink-0 mr-[2px] iconfont icon-hint_line text-[var(--info-color)]">111</span> */}
          <div class="text-[14px] leading-[20px]">
            <p class=" text-[#0a1431]">{content}</p>
          </div>
        </div>
        {tips && <p class="text-[#6C7283] mt-[8px] ml-[16px]">{tips}</p>}
      </div>
    ),
    beforeClose,
  }).then(() => {
    callback?.();
  });
};
export default confirm;
